import axios from '@/libs/api.request'
import qs from 'qs'

export const getTableData = (params) => {
  return axios.request({
    url: 'admins/checkoutRecord/udPage?t='+new Date().getTime(),
    params,
    method: 'get'
  })
}
export const echart = (params) => {
  return axios.request({
    url: 'admins/checkoutRecord/conditionUdPage?t='+new Date().getTime(),
    params,
    method: 'get'
  })
}
export const add = (data) => {
  return axios.request({
    url: 'admins/checkoutRecord/addUd',
    data: qs.stringify(data),
    method: 'post'
  })
}

export const update = (data) => {
  return axios.request({
    url: 'admins/checkoutRecord/editUd',
    data: qs.stringify(data),
    method: 'post'
  })
}

export const del = (data) => {
  return axios.request({
    url: 'admins/checkoutRecord/deleteUd?',
    data: qs.stringify(data),
    method: 'post'
  })
}


//导出
export const exp = (params) => {
  return axios.request({
    url: 'admins/checkoutRecord/udDownload?t='+new Date().getTime(),
    method: 'get',
    responseType: 'blob',
    params
  })
}
//导入
export const imp = (data) => {
  return axios.request({
    url: 'admins/checkoutRecord/udUpload',
    method: 'POST',
    data: data
  })
}
